/**表格合并自定义三层级子项
 * @param {Array} tableData
 * @param {string} firstKey
 * @param {string} secondKey
 */
 export function spanCombineArr (tableData:Array<any>,firstKey:String,secondKey:String): number[]{
  const combineArr = []
  let pos
  for(let i =0;i<tableData.length;i++){
    if(i===0){
      combineArr.push(1)
      pos = 0
    } else {
      const flag = secondKey && tableData[i][firstKey] === tableData[i-1][firstKey] &&
      tableData[i][secondKey] === tableData[i-1][secondKey]
      const flag_ = !secondKey && tableData[i][firstKey] === tableData[i-1][firstKey]
      if (flag || flag_) {
        combineArr[pos] += 1
        combineArr.push(0)
      } else {
        combineArr.push(1)
        pos = i
      }
    }
  }
  return combineArr
}
